.class public Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;
.super Landroid/view/View;
.source "SubtitleRenderView.java"


# instance fields
.field private a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;"
        }
    .end annotation
.end field

.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, -0x1

    .line 2
    invoke-direct {p0, p1, p2, v0}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 4
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->b:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public a(Ljava/util/List;)V
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Les/cd$r;",
            ">;)V"
        }
    .end annotation

    if-eqz p1, :cond_1

    .line 1
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 3
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/cd$r;

    .line 4
    iget-object v2, v1, Les/cd$r;->e:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    goto :goto_0

    .line 5
    :cond_0
    new-instance v2, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;

    const/4 v3, 0x0

    invoke-direct {v2, v3, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;-><init>(II)V

    .line 6
    iget-object v4, v1, Les/cd$r;->e:Ljava/lang/String;

    invoke-virtual {v2, v4}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;->a(Ljava/lang/String;)V

    .line 7
    iget v4, v1, Les/cd$r;->g:F

    invoke-virtual {p0}, Landroid/view/View;->getWidth()I

    move-result v5

    int-to-float v5, v5

    mul-float v4, v4, v5

    invoke-virtual {v2, v4, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;->a(FZ)V

    .line 8
    iget v3, v1, Les/cd$r;->f:I

    invoke-virtual {v2, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;->a(I)V

    .line 9
    iget-object v3, v1, Les/cd$r;->h:Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/a;

    invoke-virtual {v2, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;->a(Lcom/esfile/screen/recorder/videos/edit/activities/caption/font/a;)V

    .line 10
    iget v3, v1, Les/cd$r;->d:F

    invoke-virtual {v2, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/a;->i(F)V

    .line 11
    invoke-virtual {p0}, Landroid/view/View;->getWidth()I

    move-result v3

    int-to-float v3, v3

    iget v4, v1, Les/cd$r;->b:F

    mul-float v3, v3, v4

    invoke-virtual {v2, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/a;->j(F)V

    .line 12
    invoke-virtual {p0}, Landroid/view/View;->getHeight()I

    move-result v3

    int-to-float v3, v3

    iget v1, v1, Les/cd$r;->c:F

    mul-float v3, v3, v1

    invoke-virtual {v2, v3}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/a;->k(F)V

    .line 13
    iget-object v1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->b:Ljava/util/List;

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 14
    :cond_1
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->a:Ljava/util/List;

    .line 15
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->a:Ljava/util/List;

    if-eqz v0, :cond_1

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_1

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/esfile/screen/recorder/videos/edit/activities/decor/f;

    .line 3
    invoke-virtual {v1, p1}, Lcom/esfile/screen/recorder/videos/edit/activities/decor/a;->a(Landroid/graphics/Canvas;)V

    goto :goto_0

    :cond_1
    :goto_1
    const/4 v0, 0x0

    .line 4
    invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->drawColor(I)V

    :cond_2
    return-void
.end method

.method protected onSizeChanged(IIII)V
    .locals 0

    .line 1
    invoke-super {p0, p1, p2, p3, p4}, Landroid/view/View;->onSizeChanged(IIII)V

    .line 2
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->a:Ljava/util/List;

    if-eqz p1, :cond_0

    .line 3
    invoke-virtual {p0, p1}, Lcom/esfile/screen/recorder/videos/edit/activities/caption/p;->a(Ljava/util/List;)V

    :cond_0
    return-void
.end method
